"use strict";
const CustomTrade = require("./customtrade/index.js").CustomTrade;

let ctx = {
    platform: "taobao",
    env: "node",
    mixNick: "z01IE98JVR+EUTRXq0dG0i0pTix+Oonf5VD0dnSUq8vAJo='",
    openId:'AAHRrFnxAJuoLN3qJ7OZn2uA',
    data: {
      itemId:'626164370742',
      skuId:'4610293963637',
      price:'500',
      custominfo:'{"outer_sku_id":"VN0A4ODUNOQ106000M","refund_status":"NO_REFUND","num":1,"num_iid":626164370742,"pic_path":"https://img.alicdn.com/bao/uploaded/i4/746866993/O1CN01KWDLra21WqJ8pGf9G_!!746866993.jpg","sku_id":"4610293963637","oid":"1426625031536095171","title":"Vans自由定制鞋 - AUTHENTIC CLASSIC","outer_iid":"VN0A4ODUNOQ","price":"535.00","total_fee":"535.00","payment":"535.00","status":"WAIT_BUYER_PAY"}]',
    },
    cloud: {},
    mfUtil: { dbpattern: "mongo", db: { mongo: { find: () => {} } } },
};

const custom = new CustomTrade(ctx);



let obj = {
  openId:ctx.openId,
  itemId:ctx.data.itemId,
  skuId:ctx.data.skuId,
  price:ctx.data.price,
  custominfo:ctx.data.custominfo
}

custom.addOrderInfo(obj);


let obj_01 = {
  _id = '5fe18d50738989803c3682f7'
}

custom.getOrderInfo(obj_01);


let obj_02 = {
  orderId = '5fe18d50738989803c3682f7'
}

custom.updateOrderInfo(obj_02);